package com.naizhuai.Model.db.eneity;

import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Ignore;
import android.arch.persistence.room.PrimaryKey;
import com.naizhuai.Model.db.Tables;

import java.util.Date;

/**
 * Created by lichenxi on 2017/5/24.
 */

@Entity
public class Friend {

    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "_id")
    public int id;

    @ColumnInfo(name = "_name")
    public String name;

    @ColumnInfo(name = "last_update")
    public Date mDate;

    @Ignore
    public Friend(String name) {
        this.name = name;
        mDate = new Date(System.currentTimeMillis());
    }

    public Friend(int id, String name, Date date) {
        this.id = id;
        this.name = name;
        this.mDate = date;
    }
}
